package simulation;

import java.util.Scanner;


/**
 * This is intended to facilitate and enforce support for the loading of
 * certain objects from data read in .xsp files.
 * Interface that represents an object that can be read in from file
 * 
 * @param <T>
 * 
 * @author Scott Valentine
 * @author Dagbedji Fagnisse
 * 
 */
public interface ILoadable<T> {
    /**
     * load a loadable object from a file
     * 
     * @param line - current line to read from
     * @param o - object to be loaded into simulation
     * @return the object to add
     */
    public abstract ILoadable<T> load (Scanner line, Object o);

    /**
     * gives the keyword that load uses to identify the type of object to be loaded
     * 
     * @return - this objects keyword used in files
     */
    public abstract String getKeyword ();
}
